/*
 * PhoneProfile.java
 *
 * Created on February 2, 2009, 5:22 AM
 *
 * To change this template, choose Tools | Template Manager
 * and open the template in the editor.
 */

package com.vacuela.phonecredits;

import com.u2d.model.AbstractComplexEObject;
import com.u2d.model.EObject;
import com.u2d.model.Title;
import com.u2d.type.atom.Email;
import com.u2d.type.atom.StringEO;
import com.u2d.type.atom.USPhone;
import com.u2d.type.composite.Contact;
import com.u2d.type.composite.ContactMethod;
import com.u2d.type.composite.Emailable;
import com.u2d.type.composite.USAddress;

/**
 *
 * @author nestor.carrasco
 */

public class Owner extends AbstractComplexEObject{
    private final StringEO _firstName = new StringEO();
    private final StringEO _lastName = new StringEO();
	private final StringEO _address = new StringEO();
	private final StringEO _phone = new StringEO();
    
    public static String[] fieldOrder = {"firstName", "lastName","address","phone"};
    
    public Owner() {}
    
    public Owner(String fname, String lname,String add, String pho){
        _firstName.setValue(fname);
        _lastName.setValue(lname);
		_address.setValue(add);
		_phone.setValue(pho);
    }
    
    public StringEO getFirstName() {
        return _firstName;
    }
    
    public StringEO getLastName(){
        return _lastName;
    }

	public StringEO getAddress() {
        return _address;
    }
    
    public StringEO getPhone(){
        return _phone;
    }
    
    public Title title() {
        
        return _firstName.title().append(_lastName);
        
    }
    public String toString() {
        return title().toString();
    }
}